package com.skygrass.caesar.proxy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

@SpringCloudApplication
@EnableZuulProxy
public class ProxyApplication
{
	public static void main(String[] args)
	{
		SpringApplication.run(ProxyApplication.class, args);
	}

	//	@Bean
	//	public PatternServiceRouteMapper serviceRouteMapper()
	//	{
	//		return new PatternServiceRouteMapper("(?<name>^.+)-(?<version>v.+$)", "${name}/${version}");
	//	}

	//	@Bean
	//	public PreFiletr preFiletr()
	//	{
	//		return new PreFiletr();
	//	}

	@Bean
	public ErrorAttributes caesarErrorAttributes()
	{
		return new CaesarErrorAttributes();
	}
}
